package gui.Principal;

import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JList;
import javax.swing.JCheckBox;
import javax.swing.JButton;

import System.MainControl;

public class StatisticInformation extends JPanel implements ActionListener{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5262579450334721102L;
	private JTextField txtChooseFromThe;
	private JButton btnBack;

	/**
	 * Create the panel.
	 */
	public StatisticInformation() {
		super();
		setBackground(SystemColor.activeCaption);
		initialize();
	}

	private void initialize() {
		setBorder(new TitledBorder(null, "Statistics Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		setBackground(SystemColor.activeCaption);
		setBounds(100, 100, 622, 350);
		setLayout(null);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setModel(new DefaultComboBoxModel(new String[] {"", "Statistics On specific Teacher", "Statistics On specific Course", "Statistics On specific Student", ""}));
		comboBox.setBounds(54, 84, 147, 20);
		add(comboBox);
		
		txtChooseFromThe = new JTextField();
		txtChooseFromThe.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		txtChooseFromThe.setText("Choose from the following");
		txtChooseFromThe.setBounds(34, 39, 181, 20);
		add(txtChooseFromThe);
		txtChooseFromThe.setColumns(10);
		
		JList list = new JList();
		list.setBounds(34, 136, 181, 173);
		add(list);
		
		JCheckBox chckbxNewCheckBox = new JCheckBox("Mean");
		chckbxNewCheckBox.setEnabled(false);
		chckbxNewCheckBox.setBounds(309, 133, 134, 23);
		add(chckbxNewCheckBox);
		
		JCheckBox chckbxMedian = new JCheckBox("MEDIAN");
		chckbxMedian.setEnabled(false);
		chckbxMedian.setBounds(309, 157, 134, 23);
		add(chckbxMedian);
		
		JCheckBox chckbxDistibutionOfDecimal = new JCheckBox("Distibution of Decimal");
		chckbxDistibutionOfDecimal.setEnabled(false);
		chckbxDistibutionOfDecimal.setBounds(309, 183, 134, 23);
		add(chckbxDistibutionOfDecimal);
		
		JButton btnNewButton = new JButton("OK");
		btnNewButton.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnNewButton.setBounds(252, 270, 89, 23);
		add(btnNewButton);
		
		btnBack = new JButton("Back");
		btnBack.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnBack.addActionListener(this);
		btnBack.setBounds(371, 270, 89, 23);
		add(btnBack);
}
	
	@Override			
	public void actionPerformed(ActionEvent e) 
	{
		if(e.getSource()==btnBack)
			MainControl.setGUI(MainControl.currentUser.getRole(), this);
	}
}